import { LayoutIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";
import Expression from "@/views/reactBase/expression/index";
import Conditional from "@/views/reactBase/conditional/index";
import ReactMapRander from "@/views/reactBase/reactMapRander/index";
// 首页模块
const homeRouter: Array<RouteObject> = [
	{
		element: <LayoutIndex />,
		children: [
			{
				path: "/reactBase/expression",
				// element: lazyLoad(React.lazy(() => import("@/views/home/index"))),
				element: <Expression />,
				meta: {
					requiresAuth: true,
					title: "表达式",
					key: "/reactBase/expression"
				}
			},
			{
				path: "/reactBase/conditional",
				element: <Conditional />,
				meta: {
					requiresAuth: true,
					title: "条件渲染",
					key: "/reactBase/conditional"
				}
			},
			{
				path: "/reactBase/reactMapRander",
				element: <ReactMapRander />,
				meta: {
					requiresAuth: true,
					title: "列表渲染",
					key: "/reactBase/reactMapRander"
				}
			}
		]
	}
];

export default homeRouter;
